@import 'utils';
.PostCard {
  margin: 0.875rem;
  width: calc((100% - 8.75rem) / 5);
  position: relative;
  background: white;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  @include media('<=x-wide') {
    width: calc(25% - 1.75rem);
  }
  @include media('<=wide') {
    width: calc(33.333% - 1.75rem);
  }
  @include media('<=x-large') {
    width: calc(50% - 1.75rem);
  }
  @include media('<=large') {
    width: calc(100% - 1.75rem);
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
  }
  @include media('<medium') {
  }
  &.one-column {
    box-shadow: none;
    border: 1px solid $oc-gray-3;
    width: calc(100% - 1.75rem);
    & + & {
      margin-top: 2.5rem;
    }
    .card-content {
      box-shadow: none;
    }
  }
  & > .thumbnail-wrapper {
    width: 100%;
    padding-top: 52.63%;
    position: relative;
    display: block;
    img,
    .image-placeholder {
      background: $oc-gray-3;
      object-fit: cover;
      display: block;
      border-top-left-radius: 4px;
      border-top-right-radius: 4px;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
    .image-placeholder {
      background: $oc-gray-3;
      font-size: 5rem;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #98a8b9;
    }
    .white-mask {
      position: absolute;
      border-top-left-radius: 4px;
      border-top-right-radius: 4px;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(255, 255, 255, 0.25);
      opacity: 0;
      transition: 0.125s all ease-in;
    }
    &:hover {
      .white-mask {
        opacity: 1;
      }
    }
  }
  .card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    box-shadow: 0px -4px 16px rgba(0, 0, 0, 0.05);
    position: relative;
    border-bottom-left-radius: 4px;
    background: white;
    border-bottom-right-radius: 4px;
    padding-top: 2rem;
    padding-bottom: 2rem;
    padding-left: 1rem;
    padding-right: 1rem;
    color: $oc-gray-8;
    .user-thumbnail-wrapper {
      position: absolute;
      right: 1rem;
      top: 0;
      width: 3.5rem;
      height: 3.5rem;
      background: white;
      transform: translateY(-50%);
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
      img {
        display: block;
        width: 2.75rem;
        height: 2.75rem;
        object-fit: cover;
        border-radius: 50%;
      }
    }
    .content-head {
      position: relative;
      height: 8.5rem;
      padding-bottom: 1.5rem;
      border-bottom: 1px solid $oc-gray-2;
      .between {
        display: flex;
        justify-content: space-between;
        align-items: center;
        .username {
          font-size: 0.875rem;
          font-weight: 600;
          color: $oc-violet-5;
        }
        .private {
          background: $oc-gray-6;
          color: white;
          border-radius: 13px;
          font-size: 0.75rem;
          font-weight: 700;
          padding: 4px 12px;
          line-height: 1.5;
          align-items: center;
          svg {
            margin-right: 4px;
          }
        }
        margin-bottom: 0.5rem;
      }
      h3 {
        display: block;
        margin: 0;
        font-size: 1.25rem;
        line-height: 2rem;
        max-height: 4rem;
        font-weight: 600;
        overflow: hidden;
      }
      .subinfo {
        font-size: 0.875rem;
        margin-top: 0.5rem;
        color: #8aa6c1;
        span + span::before {
          color: $oc-gray-5;
          padding-left: 0.25rem;
          padding-right: 0.25rem;
          content: '\00B7';
        }
      }
    }
    .description {
      margin-top: 1.5rem;
      line-height: 1.5rem;
      height: 4.5rem;
      overflow-y: hidden;
      word-break: break-all;
      color: #4c657d;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }
  &.empty {
    .description {
      height: 12rem;
      -webkit-line-clamp: 8;
      -webkit-box-orient: vertical;
    }
    @include media('<large') {
      .thumbnail-wrapper {
        display: none;
      }
    }
  }
}
